<div class="dux-page-header uk-clearfix">
    <div class="page-title">
        <a class="uk-button uk-button-primary" href="{url('index')}"> 用户列表</a>
    </div>
    <div class="page-action">
        <a class="uk-button uk-button-danger" href="javascript:location.reload();"><i class="fa fa-refresh"></i></a>
    </div>
</div>
<div>
    <div class="uk-card uk-card-default uk-card-small dux-panel">
        <div class="uk-card-header">{$assignName}用户</div>
        <div class="uk-card-body">
            <form class="uk-form  uk-form-horizontal dux-form" data-dux="form-bind" method="post">
                <fieldset>
                    <div class="uk-form-group">
                        <label class="uk-form-label">角色</label>
                        <div class="uk-form-controls">
                            <select name="role_id" class="uk-form-field" data-am-selected="{btnWidth: '100%'}" required>
                                <!--loop{$roleList as $vo}-->
                                <option value="{$vo.role_id}"
                                <!--if{ $vo['role_id'] == $info['role_id'] }--> selected <!--{/if}-->
                                >{$vo.name}</option>
                                <!--{/loop}-->
                            </select>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class="uk-form-label">用户名</label>
                        <div class="uk-form-controls">
                            <input type="text" name="username" value="{$info.username}" placeholder="请输入用户名">
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class="uk-form-label">头像</label>
                        <div class="uk-form-controls">

                            <div class="uk-input-group">
                                <input type="text" class="uk-form-field" name="avatar" id="avatar" value="{$info.avatar}"
                                       placeholder="上传自定义头像">
                                        <span class="uk-input-group-btn">
                                            <button class="uk-button uk-button-default" type="button" data-dux="form-upload"
                                                    data-target="#avatar" data-type="jpg,png,bmp"><i
                                                    class="fa fa-upload"></i></button>
                                        </span>
                            </div>
                        </div>
                    </div>

                    <div class="uk-form-group">
                        <label class="uk-form-label">主页</label>
                        <div class="uk-form-controls">
                            <input type="text" name="home" value="{$info.home}" placeholder="主页">
                        </div>
                    </div>

                    <div class="uk-form-group">
                        <label class="uk-form-label">QQ</label>
                        <div class="uk-form-controls">
                            <input type="text" name="qq" value="{$info.qq}" placeholder="请输入QQ">
                        </div>
                    </div>

                    <div class="uk-form-group">
                        <label class="uk-form-label">签名</label>
                        <div class="uk-form-controls">
                            <input type="text" name="sign" value="{$info.sign}" placeholder="签名">
                        </div>
                    </div>

                    <div class="uk-form-group">
                        <label class="uk-form-label">密码</label>
                        <div class="uk-form-controls">
                            <input class="uk-form-field" type="text" onfocus="this.type='password'" name="password" placeholder="不修改密码请留空" >
                        </div>
                    </div>

                    <!--if{$info}-->

                    <div class="uk-form-group">
                        <label class="uk-form-label">注册时间</label>
                        <div class="uk-form-controls uk-form-controls-text">
                            {date('Y-m-d H:i:s', $info.reg_time)}
                        </div>
                    </div>



                    <div class="uk-form-group">
                        <label class="uk-form-label">上次登录时间</label>
                        <div class="uk-form-controls uk-form-controls-text">
                            {date('Y-m-d H:i:s', $info.login_time)}
                        </div>
                    </div>



                    <div class="uk-form-group">
                        <label class="uk-form-label">上次登录IP</label>
                        <div class="uk-form-controls uk-form-controls-text">
                            {$info.login_ip}
                        </div>
                    </div>
                    <!--{/if}-->

                    <div class="uk-form-group">
                        <label class="uk-form-label">状态</label>
                        <div class="uk-form-controls uk-form-controls-text">
                            <?php $info['status'] = isset($info['status']) ? $info['status'] : 1;  ?>
                            <div class="uk-grid">
                                <label>
                                    <!--if{$info['status']}-->
                                    <input name="status" value="1" checked="checked" type="radio">
                                    <!--{else}-->
                                    <input name="status" value="1" type="radio">
                                    <!--{/if}-->
                                    正常
                                </label>
                                <label class="">
                                    <!--if{!$info['status']}-->
                                    <input name="status" checked="checked" value="0" type="radio">
                                    <!--{else}-->
                                    <input name="status" value="0" type="radio">
                                    <!--{/if}-->
                                    禁用
                                </label>
                            </div>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <div class="am-u-sm-offset-12 am-u-md-offset-2">
                            <input type="hidden" name="user_id" value="{$info.user_id}">
                            <button class="uk-button uk-button-primary" type="submit" disabled>保存</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>